/**
 * Users.java
 *
 * Copyright (c) 2010 Prj.Manager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Prj.Manager .
 **/

package ro.prjmanager.model;


import javax.persistence.*;

/**
 * This class from the domain model is mapping the table users
 * @author Viorel Tacliciu
 * @version 1
 */

@Table(name="users")
@Entity
public class  Users{

    //define attributes that maps all columns of the coresponding table
    //this attribute maps the primary key column ID
    private java.lang.Integer id;
    //this attribute maps an bidirectional association
    //it means that FK_USER from table history_generate is a foreign key to ID
    private java.util.List<HistoryGenerate> fkUserHistoryGenerate;
    //this attribute maps an bidirectional association
    //it means that FK_USER from table user_svn_project is a foreign key to ID
    private java.util.List<UserSvnProject> fkUserUserSvnProject;
    //this attribute maps the column USER_NAME
    private  java.lang.String  userName;
    //this attribute maps the column PASSWORD
    private  java.lang.String  password;
    //this attribute maps the column FIRST_NAME
    private  java.lang.String  firstName;
    //this attribute maps the column LAST_NAME
    private  java.lang.String  lastName;
    //this attribute maps the column EMAIL
    private  java.lang.String  email;
    //end mapping columns

    //define getters and setters with coresponding ejb3 annotation, depending of the type
    //of the relation for the column

    /**
     * Mapping the primary key
     * @return - java.lang.Integer the primary key for this entity
     **/
    @Id
                 @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    public  java.lang.Integer  getId(){
        return this.id;
    }

    /**
     * The setter for ID column
     * @param id -  an java.lang.Integer object
     **/
    public void setId( java.lang.Integer  id){
        this.id=id;
    }
    /**
     * This method maps an OneToMany relation between this table and
     * HistoryGenerate table
     * @return - an list of HistoryGenerate objects
     **/
    @OneToMany(cascade=CascadeType.REFRESH)
    @JoinColumn(name = "FK_USER",referencedColumnName = "ID") 
    public java.util.List<HistoryGenerate> getFkUserHistoryGenerate(){
        return this.fkUserHistoryGenerate;
    }
    
    /**
     * This method sets the field fkUserHistoryGenerate of this entity
     * @param fkUserHistoryGenerate - an list of HistoryGenerate objects
     **/
    public void setFkUserHistoryGenerate(java.util.List<HistoryGenerate> fkUserHistoryGenerate){
        this.fkUserHistoryGenerate=fkUserHistoryGenerate;
    }
    /**
     * This method maps an OneToMany relation between this table and
     * UserSvnProject table
     * @return - an list of UserSvnProject objects
     **/
    @OneToMany(cascade=CascadeType.REFRESH)
    @JoinColumn(name = "FK_USER",referencedColumnName = "ID") 
    public java.util.List<UserSvnProject> getFkUserUserSvnProject(){
        return this.fkUserUserSvnProject;
    }
    
    /**
     * This method sets the field fkUserUserSvnProject of this entity
     * @param fkUserUserSvnProject - an list of UserSvnProject objects
     **/
    public void setFkUserUserSvnProject(java.util.List<UserSvnProject> fkUserUserSvnProject){
        this.fkUserUserSvnProject=fkUserUserSvnProject;
    }
    /**
     * This method gets the userName attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "USER_NAME")
    public  java.lang.String  getUserName(){
        return this.userName;
    }

    /**
     * The setter for USER_NAME column
     * @param userName -  an  java.lang.String  object
     **/
    public void setUserName( java.lang.String  userName){
        this.userName=userName;
    }
    /**
     * This method gets the password attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "PASSWORD")
    public  java.lang.String  getPassword(){
        return this.password;
    }

    /**
     * The setter for PASSWORD column
     * @param password -  an  java.lang.String  object
     **/
    public void setPassword( java.lang.String  password){
        this.password=password;
    }
    /**
     * This method gets the firstName attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "FIRST_NAME")
    public  java.lang.String  getFirstName(){
        return this.firstName;
    }

    /**
     * The setter for FIRST_NAME column
     * @param firstName -  an  java.lang.String  object
     **/
    public void setFirstName( java.lang.String  firstName){
        this.firstName=firstName;
    }
    /**
     * This method gets the lastName attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "LAST_NAME")
    public  java.lang.String  getLastName(){
        return this.lastName;
    }

    /**
     * The setter for LAST_NAME column
     * @param lastName -  an  java.lang.String  object
     **/
    public void setLastName( java.lang.String  lastName){
        this.lastName=lastName;
    }
    /**
     * This method gets the email attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "EMAIL")
    public  java.lang.String  getEmail(){
        return this.email;
    }

    /**
     * The setter for EMAIL column
     * @param email -  an  java.lang.String  object
     **/
    public void setEmail( java.lang.String  email){
        this.email=email;
    }
}



